package com.jsu.springboot_medicine.service.impl;

import com.jsu.springboot_medicine.dao.HospitalDao;
import com.jsu.springboot_medicine.entity.Hospital;
import com.jsu.springboot_medicine.entity.User;
import com.jsu.springboot_medicine.service.HospitalService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author js
 * @name HospitalServiceImpl
 * @Date 2023/10/1 12:56
 */
@Service
public class HospitalServiceImpl implements HospitalService {
    @Resource
    private HospitalDao hospitalDao;
    @Override
    public List<Hospital> selectAll() {
        return hospitalDao.selectAll();
    }

    @Override
    public Hospital selectById(int id) {
        return hospitalDao.selectById(id);
    }

    @Override
    public int update(Hospital hospital) {
        return hospitalDao.update(hospital);
    }

    @Override
    public List<Hospital> selectByName(String name) {
        return hospitalDao.selectByName(name);
    }

    @Override
    public int delete(int id) {
        return hospitalDao.delete(id);
    }

    @Override
    public int insert(Hospital hospital) {
        return hospitalDao.insert(hospital);
    }

    @Override
    public int countByNameLike(String name) {
        return hospitalDao.countByNameLike(name);
    }
}
